package com.bw.mvvm_common.utils;

import android.text.TextUtils;

import com.blankj.utilcode.util.EncryptUtils;

import java.util.Arrays;

public class SignUtils {

    //服务器接口参数值进行按照sign生成规则进行生成
    //value->接口参数值拼接出来的字符串
    //生序+tamboo->md5->转小写
    public static String createSign(String value){
        if (TextUtils.isEmpty(value))
            return "";
        String sign;
        //字符串转字节
        char[]buff = value.toCharArray();
        Arrays.sort(buff);
        //生成新字符串
        sign = new String(buff);
        sign +="tamboo";
        return EncryptUtils.encryptMD5ToString(sign).toLowerCase();
    }

}
